package com.example.demo.arithmetic;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;

/**
 * Description: 字符串的空格替换为%20<br/>
 *
 * @author liulonglong
 * @taskId <br/>
 * @Date 2020/3/11 14:49
 * @Version 1.0
 */
public class StringReplace {

    private final static String CONST = "We are happy!";

    public static String replaceByChar(String source) {
        if (source.length() < 1) {
            return null;
        }
        char[] chars = source.toCharArray();
        StringBuilder sb = new StringBuilder();
        for (char c : chars) {
            if (c == 32) {
                sb.append("%20");
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }

    //    public static void main(String[] args) {
    //        String replace = replaceByChar(CONST);
    //        int length = getLength("hello world");
    //        System.out.println(length);
    //    }

    //    public static int getLength(String word) {
    //
    //        String[] words = word.split(" ");
    //        return words[words.length - 1].length();
    //    }

    public static int getLength(String word) {

        String[] words = word.split(" ");
        return words[words.length - 1].length();
    }

    //    public static void main(String[] args) {

    //        Scanner sc = new Scanner(System.in);
    //        String s = "";
    //
    //        s = sc.nextLine();
    //        System.out.println("输入的为：" + s);
    //
    //        char c;
    //
    //        c = sc.next().charAt(0);
    //        System.out.println("输入的为：" + c);
    //        char[] chars = s.toCharArray();
    //        int count = 0;
    //        for (int i = 0; i < chars.length; i++) {
    //            if (chars[i] == c || chars[i] == c + 32 || chars[i] == c - 32) {
    //                count++;
    //            }
    //        }
    //        System.out.println(count);
    //
    //    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            HashSet<Integer> set = new HashSet<>();
            for (int i = 0; i < n; i++) {
                int curr = sc.nextInt();
                set.add(curr);
            }
            Collections.sort(new ArrayList<>(set));
            set.forEach(System.out::println);
        }
    }
}